\(\int \frac {\coth ^2(c+d x)}{(a+b \tanh ^2(c+d x))^3} \, dx\) [198]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 178 \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\frac {x}{(a+b)^3}-\frac {b^{3/2} \left (35 a^2+42 a b+15 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{7/2} (a+b)^3 d}-\frac {\left (8 a^2+27 a b+15 b^2\right ) \coth (c+d x)}{8 a^3 (a+b)^2 d}+\frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )} \]

[Out]

x/(a+b)^3-1/8*b^(3/2)*(35*a^2+42*a*b+15*b^2)*arctan(b^(1/2)*tanh(d*x+c)/a^(1/2))/a^(7/2)/(a+b)^3/d-1/8*(8*a^2+
27*a*b+15*b^2)*coth(d*x+c)/a^3/(a+b)^2/d+1/4*b*coth(d*x+c)/a/(a+b)/d/(a+b*tanh(d*x+c)^2)^2+1/8*b*(9*a+5*b)*cot
h(d*x+c)/a^2/(a+b)^2/d/(a+b*tanh(d*x+c)^2)

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3751, 483, 593, 597, 536, 212, 211} \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 d (a+b)^2 \left (a+b \tanh ^2(c+d x)\right )}-\frac {b^{3/2} \left (35 a^2+42 a b+15 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{7/2} d (a+b)^3}-\frac {\left (8 a^2+27 a b+15 b^2\right ) \coth (c+d x)}{8 a^3 d (a+b)^2}+\frac {b \coth (c+d x)}{4 a d (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {x}{(a+b)^3} \]

[In]

Int[Coth[c + d*x]^2/(a + b*Tanh[c + d*x]^2)^3,x]

[Out]

x/(a + b)^3 - (b^(3/2)*(35*a^2 + 42*a*b + 15*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/(8*a^(7/2)*(a + b)^
3*d) - ((8*a^2 + 27*a*b + 15*b^2)*Coth[c + d*x])/(8*a^3*(a + b)^2*d) + (b*Coth[c + d*x])/(4*a*(a + b)*d*(a + b
*Tanh[c + d*x]^2)^2) + (b*(9*a + 5*b)*Coth[c + d*x])/(8*a^2*(a + b)^2*d*(a + b*Tanh[c + d*x]^2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 483

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*(e*
x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*e*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a*d)
*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n
*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ
[p, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 593

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*g*n*(b*c - a*d)*(p +
 1))), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)
*(m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 597

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*c*g*(m + 1))), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^2 \left (1-x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d} \\ & = \frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\text {Subst}\left (\int \frac {-4 a-5 b+5 b x^2}{x^2 \left (1-x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 a (a+b) d} \\ & = \frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2+27 a b+15 b^2-3 b (9 a+5 b) x^2}{x^2 \left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{8 a^2 (a+b)^2 d} \\ & = -\frac {\left (8 a^2+27 a b+15 b^2\right ) \coth (c+d x)}{8 a^3 (a+b)^2 d}+\frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {-8 a^3+8 a^2 b+27 a b^2+15 b^3-b \left (8 a^2+27 a b+15 b^2\right ) x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{8 a^3 (a+b)^2 d} \\ & = -\frac {\left (8 a^2+27 a b+15 b^2\right ) \coth (c+d x)}{8 a^3 (a+b)^2 d}+\frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{(a+b)^3 d}-\frac {\left (b^2 \left (35 a^2+42 a b+15 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tanh (c+d x)\right )}{8 a^3 (a+b)^3 d} \\ & = \frac {x}{(a+b)^3}-\frac {b^{3/2} \left (35 a^2+42 a b+15 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{7/2} (a+b)^3 d}-\frac {\left (8 a^2+27 a b+15 b^2\right ) \coth (c+d x)}{8 a^3 (a+b)^2 d}+\frac {b \coth (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (9 a+5 b) \coth (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 6.80 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.93 \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=-\frac {-\frac {8 (c+d x)}{(a+b)^3}+\frac {b^{3/2} \left (35 a^2+42 a b+15 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{7/2} (a+b)^3}+\frac {8 \coth (c+d x)}{a^3}+\frac {4 b^3 \sinh (2 (c+d x))}{a^2 (a+b)^2 (a-b+(a+b) \cosh (2 (c+d x)))^2}+\frac {b^2 (13 a+7 b) \sinh (2 (c+d x))}{a^3 (a+b)^2 (a-b+(a+b) \cosh (2 (c+d x)))}}{8 d} \]

[In]

Integrate[Coth[c + d*x]^2/(a + b*Tanh[c + d*x]^2)^3,x]

[Out]

-1/8*((-8*(c + d*x))/(a + b)^3 + (b^(3/2)*(35*a^2 + 42*a*b + 15*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/
(a^(7/2)*(a + b)^3) + (8*Coth[c + d*x])/a^3 + (4*b^3*Sinh[2*(c + d*x)])/(a^2*(a + b)^2*(a - b + (a + b)*Cosh[2
*(c + d*x)])^2) + (b^2*(13*a + 7*b)*Sinh[2*(c + d*x)])/(a^3*(a + b)^2*(a - b + (a + b)*Cosh[2*(c + d*x)])))/d

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.94

method result size
derivativedivides \(-\frac {-\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2 \left (a +b \right )^{3}}+\frac {b^{2} \left (\frac {\left (\frac {11}{8} a^{2} b +\frac {9}{4} a \,b^{2}+\frac {7}{8} b^{3}\right ) \tanh \left (d x +c \right )^{3}+\frac {a \left (13 a^{2}+22 a b +9 b^{2}\right ) \tanh \left (d x +c \right )}{8}}{\left (a +b \tanh \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (35 a^{2}+42 a b +15 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{\left (a +b \right )^{3} a^{3}}+\frac {1}{a^{3} \tanh \left (d x +c \right )}+\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) \(167\)
default \(-\frac {-\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2 \left (a +b \right )^{3}}+\frac {b^{2} \left (\frac {\left (\frac {11}{8} a^{2} b +\frac {9}{4} a \,b^{2}+\frac {7}{8} b^{3}\right ) \tanh \left (d x +c \right )^{3}+\frac {a \left (13 a^{2}+22 a b +9 b^{2}\right ) \tanh \left (d x +c \right )}{8}}{\left (a +b \tanh \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (35 a^{2}+42 a b +15 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{\left (a +b \right )^{3} a^{3}}+\frac {1}{a^{3} \tanh \left (d x +c \right )}+\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) \(167\)
risch \(\frac {x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {-60 b^{5} {\mathrm e}^{6 d x +6 c}+90 b^{5} {\mathrm e}^{4 d x +4 c}+8 a^{5}+15 b^{5}+40 a^{4} b +93 a^{3} b^{2}+113 a^{2} b^{3}+67 a \,b^{4}-60 b^{5} {\mathrm e}^{2 d x +2 c}+66 a^{2} b^{3} {\mathrm e}^{4 d x +4 c}-138 a \,b^{4} {\mathrm e}^{6 d x +6 c}+172 a \,b^{4} {\mathrm e}^{4 d x +4 c}-158 a \,b^{4} {\mathrm e}^{2 d x +2 c}+77 a^{2} b^{3} {\mathrm e}^{8 d x +8 c}+57 a \,b^{4} {\mathrm e}^{8 d x +8 c}+15 b^{5} {\mathrm e}^{8 d x +8 c}+32 a^{5} {\mathrm e}^{6 d x +6 c}+8 a^{5} {\mathrm e}^{8 d x +8 c}+32 \,{\mathrm e}^{2 d x +2 c} a^{5}+48 \,{\mathrm e}^{4 d x +4 c} a^{5}-56 a^{2} b^{3} {\mathrm e}^{6 d x +6 c}+40 \,{\mathrm e}^{8 d x +8 c} a^{4} b +67 \,{\mathrm e}^{8 d x +8 c} a^{3} b^{2}+96 \,{\mathrm e}^{2 d x +2 c} a^{4} b +90 \,{\mathrm e}^{2 d x +2 c} a^{3} b^{2}-72 \,{\mathrm e}^{2 d x +2 c} a^{2} b^{3}+112 \,{\mathrm e}^{4 d x +4 c} a^{4} b +96 \,{\mathrm e}^{4 d x +4 c} a^{3} b^{2}+96 b \,a^{4} {\mathrm e}^{6 d x +6 c}+38 a^{3} b^{2} {\mathrm e}^{6 d x +6 c}}{4 \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 \,{\mathrm e}^{2 d x +2 c} a -2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )^{2} \left (a^{2}+2 a b +b^{2}\right ) \left (a +b \right ) a^{3} d \left ({\mathrm e}^{2 d x +2 c}-1\right )}+\frac {35 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b}{16 a^{2} \left (a +b \right )^{3} d}+\frac {21 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b^{2}}{8 a^{3} \left (a +b \right )^{3} d}+\frac {15 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{16 a^{4} \left (a +b \right )^{3} d}-\frac {35 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}+a -b}{a +b}\right ) b}{16 a^{2} \left (a +b \right )^{3} d}-\frac {21 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}+a -b}{a +b}\right ) b^{2}}{8 a^{3} \left (a +b \right )^{3} d}-\frac {15 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}+a -b}{a +b}\right )}{16 a^{4} \left (a +b \right )^{3} d}\) \(833\)

[In]

int(coth(d*x+c)^2/(a+b*tanh(d*x+c)^2)^3,x,method=_RETURNVERBOSE)

[Out]

-1/d*(-1/2/(a+b)^3*ln(tanh(d*x+c)+1)+b^2/(a+b)^3/a^3*(((11/8*a^2*b+9/4*a*b^2+7/8*b^3)*tanh(d*x+c)^3+1/8*a*(13*
a^2+22*a*b+9*b^2)*tanh(d*x+c))/(a+b*tanh(d*x+c)^2)^2+1/8*(35*a^2+42*a*b+15*b^2)/(a*b)^(1/2)*arctan(b*tanh(d*x+
c)/(a*b)^(1/2)))+1/a^3/tanh(d*x+c)+1/2/(a+b)^3*ln(tanh(d*x+c)-1))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 5772 vs. \(2 (162) = 324\).

Time = 0.44 (sec) , antiderivative size = 11865, normalized size of antiderivative = 66.66 \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \]

[In]

integrate(coth(d*x+c)^2/(a+b*tanh(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

Too large to include

Sympy [F]

\[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\int \frac {\coth ^{2}{\left (c + d x \right )}}{\left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{3}}\, dx \]

[In]

integrate(coth(d*x+c)**2/(a+b*tanh(d*x+c)**2)**3,x)

[Out]

Integral(coth(c + d*x)**2/(a + b*tanh(c + d*x)**2)**3, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1944 vs. \(2 (162) = 324\).

Time = 0.65 (sec) , antiderivative size = 1944, normalized size of antiderivative = 10.92 \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \]

[In]

integrate(coth(d*x+c)^2/(a+b*tanh(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

-1/4*(3*a^2*b + 3*a*b^2 + b^3)*log((a + b)*e^(4*d*x + 4*c) + 2*(a - b)*e^(2*d*x + 2*c) + a + b)/((a^6 + 3*a^5*
b + 3*a^4*b^2 + a^3*b^3)*d) + 1/4*(3*a^2*b + 3*a*b^2 + b^3)*log(2*(a - b)*e^(-2*d*x - 2*c) + (a + b)*e^(-4*d*x
 - 4*c) + a + b)/((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*d) + 1/32*(15*a^3*b - 25*a^2*b^2 - 39*a*b^3 - 15*b^4)*
arctan(1/2*((a + b)*e^(2*d*x + 2*c) + a - b)/sqrt(a*b))/((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*sqrt(a*b)*d) -
1/32*(15*a^3*b - 25*a^2*b^2 - 39*a*b^3 - 15*b^4)*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) + a - b)/sqrt(a*b))/((a^
6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*sqrt(a*b)*d) + 1/16*(8*a^5 + 31*a^4*b + 72*a^3*b^2 + 98*a^2*b^3 + 64*a*b^4
+ 15*b^5 + (8*a^5 + 49*a^4*b + 18*a^3*b^2 + 38*a*b^4 + 15*b^5)*e^(8*d*x + 8*c) + 2*(16*a^5 + 57*a^4*b - 9*a^3*
b^2 + 37*a^2*b^3 - 39*a*b^4 - 30*b^5)*e^(6*d*x + 6*c) + 2*(24*a^5 + 56*a^4*b + 83*a^3*b^2 - 37*a^2*b^3 + 53*a*
b^4 + 45*b^5)*e^(4*d*x + 4*c) + 2*(16*a^5 + 39*a^4*b + 73*a^3*b^2 + 15*a^2*b^3 - 65*a*b^4 - 30*b^5)*e^(2*d*x +
 2*c))/((a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5*a^4*b^4 + a^3*b^5 - (a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*
b^3 + 5*a^4*b^4 + a^3*b^5)*e^(10*d*x + 10*c) - (3*a^8 + 7*a^7*b - 2*a^6*b^2 - 18*a^5*b^3 - 17*a^4*b^4 - 5*a^3*
b^5)*e^(8*d*x + 8*c) - 2*(a^8 + a^7*b + 2*a^6*b^2 + 10*a^5*b^3 + 13*a^4*b^4 + 5*a^3*b^5)*e^(6*d*x + 6*c) + 2*(
a^8 + a^7*b + 2*a^6*b^2 + 10*a^5*b^3 + 13*a^4*b^4 + 5*a^3*b^5)*e^(4*d*x + 4*c) + (3*a^8 + 7*a^7*b - 2*a^6*b^2
- 18*a^5*b^3 - 17*a^4*b^4 - 5*a^3*b^5)*e^(2*d*x + 2*c))*d) - 1/16*(8*a^5 + 31*a^4*b + 72*a^3*b^2 + 98*a^2*b^3
+ 64*a*b^4 + 15*b^5 + 2*(16*a^5 + 39*a^4*b + 73*a^3*b^2 + 15*a^2*b^3 - 65*a*b^4 - 30*b^5)*e^(-2*d*x - 2*c) + 2
*(24*a^5 + 56*a^4*b + 83*a^3*b^2 - 37*a^2*b^3 + 53*a*b^4 + 45*b^5)*e^(-4*d*x - 4*c) + 2*(16*a^5 + 57*a^4*b - 9
*a^3*b^2 + 37*a^2*b^3 - 39*a*b^4 - 30*b^5)*e^(-6*d*x - 6*c) + (8*a^5 + 49*a^4*b + 18*a^3*b^2 + 38*a*b^4 + 15*b
^5)*e^(-8*d*x - 8*c))/((a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5*a^4*b^4 + a^3*b^5 + (3*a^8 + 7*a^7*b - 2*a
^6*b^2 - 18*a^5*b^3 - 17*a^4*b^4 - 5*a^3*b^5)*e^(-2*d*x - 2*c) + 2*(a^8 + a^7*b + 2*a^6*b^2 + 10*a^5*b^3 + 13*
a^4*b^4 + 5*a^3*b^5)*e^(-4*d*x - 4*c) - 2*(a^8 + a^7*b + 2*a^6*b^2 + 10*a^5*b^3 + 13*a^4*b^4 + 5*a^3*b^5)*e^(-
6*d*x - 6*c) - (3*a^8 + 7*a^7*b - 2*a^6*b^2 - 18*a^5*b^3 - 17*a^4*b^4 - 5*a^3*b^5)*e^(-8*d*x - 8*c) - (a^8 + 5
*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5*a^4*b^4 + a^3*b^5)*e^(-10*d*x - 10*c))*d) - 1/8*(8*a^4 + 41*a^3*b + 73*a^
2*b^2 + 55*a*b^3 + 15*b^4 + 2*(16*a^4 + 41*a^3*b - 55*a*b^3 - 30*b^4)*e^(-2*d*x - 2*c) + 2*(24*a^4 + 32*a^3*b
+ 5*a^2*b^2 + 50*a*b^3 + 45*b^4)*e^(-4*d*x - 4*c) + 2*(16*a^4 + 23*a^3*b - 45*a*b^3 - 30*b^4)*e^(-6*d*x - 6*c)
 + (8*a^4 + 23*a^3*b + 45*a^2*b^2 + 45*a*b^3 + 15*b^4)*e^(-8*d*x - 8*c))/((a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b
^3 + a^3*b^4 + (3*a^7 + 4*a^6*b - 6*a^5*b^2 - 12*a^4*b^3 - 5*a^3*b^4)*e^(-2*d*x - 2*c) + 2*(a^7 + 2*a^5*b^2 +
8*a^4*b^3 + 5*a^3*b^4)*e^(-4*d*x - 4*c) - 2*(a^7 + 2*a^5*b^2 + 8*a^4*b^3 + 5*a^3*b^4)*e^(-6*d*x - 6*c) - (3*a^
7 + 4*a^6*b - 6*a^5*b^2 - 12*a^4*b^3 - 5*a^3*b^4)*e^(-8*d*x - 8*c) - (a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 +
a^3*b^4)*e^(-10*d*x - 10*c))*d) + 15/16*b*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) + a - b)/sqrt(a*b))/(sqrt(a*b)*
a^3*d) + 1/2*log(e^(2*d*x + 2*c) - 1)/(a^3*d) - 1/2*log(e^(-2*d*x - 2*c) - 1)/(a^3*d)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 437 vs. \(2 (162) = 324\).

Time = 0.46 (sec) , antiderivative size = 437, normalized size of antiderivative = 2.46 \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=-\frac {\frac {{\left (35 \, a^{2} b^{2} + 42 \, a b^{3} + 15 \, b^{4}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{{\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \sqrt {a b}} - \frac {8 \, {\left (d x + c\right )}}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (13 \, a^{3} b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 3 \, a^{2} b^{3} e^{\left (6 \, d x + 6 \, c\right )} - 17 \, a b^{4} e^{\left (6 \, d x + 6 \, c\right )} - 7 \, b^{5} e^{\left (6 \, d x + 6 \, c\right )} + 39 \, a^{3} b^{2} e^{\left (4 \, d x + 4 \, c\right )} - 5 \, a^{2} b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 25 \, a b^{4} e^{\left (4 \, d x + 4 \, c\right )} + 21 \, b^{5} e^{\left (4 \, d x + 4 \, c\right )} + 39 \, a^{3} b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 25 \, a^{2} b^{3} e^{\left (2 \, d x + 2 \, c\right )} - 35 \, a b^{4} e^{\left (2 \, d x + 2 \, c\right )} - 21 \, b^{5} e^{\left (2 \, d x + 2 \, c\right )} + 13 \, a^{3} b^{2} + 33 \, a^{2} b^{3} + 27 \, a b^{4} + 7 \, b^{5}\right )}}{{\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}^{2}} + \frac {16}{a^{3} {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}}}{8 \, d} \]

[In]

integrate(coth(d*x+c)^2/(a+b*tanh(d*x+c)^2)^3,x, algorithm="giac")

[Out]

-1/8*((35*a^2*b^2 + 42*a*b^3 + 15*b^4)*arctan(1/2*(a*e^(2*d*x + 2*c) + b*e^(2*d*x + 2*c) + a - b)/sqrt(a*b))/(
(a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*sqrt(a*b)) - 8*(d*x + c)/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) - 2*(13*a^3*b^2
*e^(6*d*x + 6*c) + 3*a^2*b^3*e^(6*d*x + 6*c) - 17*a*b^4*e^(6*d*x + 6*c) - 7*b^5*e^(6*d*x + 6*c) + 39*a^3*b^2*e
^(4*d*x + 4*c) - 5*a^2*b^3*e^(4*d*x + 4*c) + 25*a*b^4*e^(4*d*x + 4*c) + 21*b^5*e^(4*d*x + 4*c) + 39*a^3*b^2*e^
(2*d*x + 2*c) + 25*a^2*b^3*e^(2*d*x + 2*c) - 35*a*b^4*e^(2*d*x + 2*c) - 21*b^5*e^(2*d*x + 2*c) + 13*a^3*b^2 +
33*a^2*b^3 + 27*a*b^4 + 7*b^5)/((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*(a*e^(4*d*x + 4*c) + b*e^(4*d*x + 4*c) +
 2*a*e^(2*d*x + 2*c) - 2*b*e^(2*d*x + 2*c) + a + b)^2) + 16/(a^3*(e^(2*d*x + 2*c) - 1)))/d

Mupad [F(-1)]

Timed out. \[ \int \frac {\coth ^2(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\int \frac {{\mathrm {coth}\left (c+d\,x\right )}^2}{{\left (b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+a\right )}^3} \,d x \]

[In]

int(coth(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3,x)

[Out]

int(coth(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x)